#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021, Henrik Hose
# Copyright (c) 2021, Raphael Lehmann
#
# This file is part of the modm project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# -----------------------------------------------------------------------------

def init(module):
    module.name = ":driver:stusb4500"
    module.description = """\
# STUSB4500 USB PD controller

## Standalone USB PD controller for power sinking devices

The STUSB4500 is a USB power delivery controller for USB power sink devices.
See https://www.st.com/en/interfaces-and-transceivers/stusb4500.html

The STUSB4500 is connected via I2C to the microcontroller.

This driver only implements basic functionality for now.
"""

def prepare(module, options):
    module.depends(":architecture:i2c.device")
    return True

def build(env):
    env.outbasepath = "modm/src/modm/driver/usb"
    env.copy("stusb4500.hpp")
